import Vue from 'vue'
import App from './App.vue'
import router from './router/index'
import store from './store/index'
import ElementUI from 'element-ui'
import '@/assets/styles/element-variables.scss'
import '@/assets/styles/global.scss'
import '@/assets/styles/iconfont.scss'
import '@/assets/styles/hdbl.scss'
import util from '@/assets/js/util'
import '../node_modules/echarts/map/js/world.js' // 引入世界地图

function randomString(len) {
  let $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';    /****默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1****/
  let maxPos = $chars.length;
  let pwd = '';
  for (let i = 0; i < len; i++) {
    pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
  }
  return pwd;
}


import axios from 'axios' 
Vue.prototype.$http=axios
Vue.config.productionTip = false

// import 'element-ui/lib/theme-chalk/index.css';
import { get } from 'lodash'
import dayjs from 'dayjs'
// import echarts from 'echarts'
// Vue.prototype.$echarts = echarts
import echarts from 'echarts'
Vue.prototype.$echarts = echarts
Vue.prototype.randstr=randomString
require('echarts/lib/chart/bar');
// 引入提示框和title组件
require('echarts/lib/component/tooltip');
require('echarts/lib/component/title');
import NoData from '@/views/_common/noData.vue'

Vue.filter('DayFormat', (date: any) => {
  return date ? dayjs(date).format('YYYY-MM-DD') : ''
})

Vue.component('noData', NoData);// 没有数据时显示的全局组件
Vue.use(ElementUI)
Vue.use(util)
Vue.config.productionTip = false

Vue.prototype.$get = get

let app= new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
